# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=arpspoof-smikims
pkgver=31.ef5f0b1
pkgrel=3
groups=('blackarch' 'blackarch-spoof' 'blackarch-exploitation'
        'blackarch-networking')
pkgdesc="Performs an ARP spoofing attack using the Linux kernel's raw sockets."
arch=('x86_64' 'aarch64')
url='https://github.com/smikims/arpspoof'
license=('custom:unknown')
makedepends=('git')
provides=('smikims-arpspoof')
replaces=('smikims-arpspoof')
source=("$pkgname::git+https://github.com/smikims/arpspoof.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)

}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 arpspoof "$pkgdir/usr/bin/$pkgname"
  install -m 755 sweep.sh "$pkgdir/usr/bin/$pkgname-sweep"
  install -m 755 cage.sh "$pkgdir/usr/bin/$pkgname-cage"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

